<?php
/**
 * Created by PhpStorm.
 * User: lenovo
 * Date: 2019/1/11
 * Time: 20:34
 */
$re=swoole_async_readfile(__DIR__.'/1.txt',function ($filename,$content){
    echo $content.PHP_EOL;
    echo $filename.PHP_EOL;
});
var_dump($re);
//filesize(__DIR__.'/1.txt');
Swoole\Async::readfile(__DIR__.'/1.txt',function ($filename,$content){
    echo $content.PHP_EOL;
    echo $filename.PHP_EOL;
});
echo 'read.php start....'.PHP_EOL;